package com.bjdd.jdy.util;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import com.bjdd.jdy.entity.NewsBean;
import com.bjdd.jdy.entity.OrderBean;
import com.bjdd.jdy.ui.Emergency.EmergencyActivity;
import com.bjdd.jdy.ui.MainActivity;
import com.bjdd.jdy.ui.aboutUs.AboutUsActivity;
import com.bjdd.jdy.ui.bankCard.BankCardActivity;
import com.bjdd.jdy.ui.bindCard.BindCardActivity;
import com.bjdd.jdy.ui.commitCard.CommitCardActivity;
import com.bjdd.jdy.ui.dealRecord.DealRecordActivity;
import com.bjdd.jdy.ui.exam.ExamActivity;
import com.bjdd.jdy.ui.feedback.FeedBackActivity;
import com.bjdd.jdy.ui.guide.GuideActivity;
import com.bjdd.jdy.ui.inspection.InspectionActivity;
import com.bjdd.jdy.ui.login.LoginActivity;
import com.bjdd.jdy.ui.map.MapActivity;
import com.bjdd.jdy.ui.newsDetail.NewsDetailActivity;
import com.bjdd.jdy.ui.order.OrderActivity;
import com.bjdd.jdy.ui.orderDetail.OrderDetailActivity;
import com.bjdd.jdy.ui.pay.PayActivity;
import com.bjdd.jdy.ui.ready.ReadyActivity;
import com.bjdd.jdy.ui.register.RegisterActivity;
import com.bjdd.jdy.ui.resetPwd.ResetPwdActivity;
import com.bjdd.jdy.ui.setting.SettingActivity;
import com.bjdd.jdy.ui.sign.SignActivity;
import com.bjdd.jdy.ui.signScan.SignScanActivity;
import com.bjdd.jdy.ui.userCenter.UserCenterActivity;
import com.bjdd.jdy.ui.videoExam.VideoExamActivity;
import com.bjdd.jdy.ui.wallet.WalletActivity;
import com.bjdd.jdy.ui.withdraw.WithDrawActivity;


/**
 * Created by yukai on 2016/11/13.
 */

public class JumpUtil {

    public static void toLogin(Context context){
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
    }

    public static void toMain(Context context){
        Intent intent = new Intent(context, MainActivity.class);
        context.startActivity(intent);
    }
    public static void toRegister(Context context,String title,int type){
        Intent intent = new Intent(context, RegisterActivity.class);
        Bundle bundle = new Bundle();
        bundle.putInt("type",type);
        bundle.putString("title",title);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toCommit(Context context){
        Intent intent = new Intent(context, CommitCardActivity.class);
        context.startActivity(intent);
    }
    public static void toResetPwd(Context context){
        Intent intent = new Intent(context, ResetPwdActivity.class);
        context.startActivity(intent);
    }
    public static void toExam(Context context){
        Intent intent = new Intent(context, ExamActivity.class);
        context.startActivity(intent);
    }
    public static void toMap(Context context){
        Intent intent = new Intent(context,MapActivity.class);
        context.startActivity(intent);
    }
    public static void toReady(Context context){
        Intent intent = new Intent(context, ReadyActivity.class);
        context.startActivity(intent);
    }
    public static void toUserCenter(Context context){
        Intent intent = new Intent(context, UserCenterActivity.class);
        context.startActivity(intent);
    }
    public static void toInspection(Context context,String orderId){
        Intent intent = new Intent(context, InspectionActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("orderId",orderId);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toSign(Context context,String orderId){
        Intent intent = new Intent(context, SignActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("orderId",orderId);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toOrderDetail(Context context,String orderNo){
        Intent intent = new Intent(context, OrderDetailActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("orderNo",orderNo);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toSetting(Context context){
        Intent intent = new Intent(context, SettingActivity.class);
        context.startActivity(intent);
    }
    public static void toSignScan(Context context,String orderNo,String orderId,double lat,double lng){
        Intent intent = new Intent(context, SignScanActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("orderNo",orderNo);
        bundle.putString("orderId",orderId);
        bundle.putDouble("lat",lat);
        bundle.putDouble("lng",lng);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toFeedBack(Context context){
        Intent intent = new Intent(context, FeedBackActivity.class);
        context.startActivity(intent);
    }
    public static void toPay(Context context, String orderNo,double lat,double lng){
        Intent intent = new Intent(context, PayActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("orderNo",orderNo);
        bundle.putDouble("lat",lat);
        bundle.putDouble("lng",lng);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toWallet(Context context){
        Intent intent = new Intent(context, WalletActivity.class);
        context.startActivity(intent);
    }
    public static void toDealRecord(Context context){
        Intent intent = new Intent(context, DealRecordActivity.class);
        context.startActivity(intent);
    }
    public static void toCall(Context context,String phone){
        Intent intent=new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+phone));
        context.startActivity(intent);
    }
    public static void toBankCard(Context context){
        Intent intent = new Intent(context, BankCardActivity.class);
        context.startActivity(intent);
    }
    public static void toBindCard(Context context){
        Intent intent = new Intent(context, BindCardActivity.class);
        context.startActivity(intent);
    }
    public static void toWithDraw(Context context){
        Intent intent = new Intent(context, WithDrawActivity.class);
        context.startActivity(intent);
    }
    public static void toOrder(Context context){
        Intent intent = new Intent(context, OrderActivity.class);
        context.startActivity(intent);
    }
    public static void toEmergency(Context context){
        Intent intent = new Intent(context, EmergencyActivity.class);
        context.startActivity(intent);
    }
    public static void toAboutUs(Context context){
        Intent intent = new Intent(context, AboutUsActivity.class);
        context.startActivity(intent);
    }
    public static void toGuide(Context context){
        Intent intent = new Intent(context, GuideActivity.class);
        context.startActivity(intent);
    }
    public static void toVideoExam(Context context,int type){
        Intent intent = new Intent(context, VideoExamActivity.class);
        Bundle bundle = new Bundle();
        bundle.putInt("type",type);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    public static void toNewsDetail(Context context, int type,long time,String content){
        Intent intent = new Intent(context, NewsDetailActivity.class);
        Bundle bundle = new Bundle();
        bundle.putInt("type",type);
        bundle.putLong("time",time);
        bundle.putString("content",content);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }

}
